﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="CtrlMonthFundMX.ascx.cs"
    Inherits="Thksoft.UserCotrols.CtrlMonthFundMX" %>
<link href="/CSS/Main.css" rel="stylesheet" type="text/css" />
<script src="/Scripts/jquery-1.4.1.js" type="text/javascript"></script>
<script type="text/javascript">
    function PrintApplyBill() {
        var va = document.getElementById("<%=this.hidId.ClientID %>").value;
        $("#<%=Button1.ClientID %>").remove();
        window.showModalDialog("../Print/PrintMonth.aspx?PID=" + va, "", "dialogHeight:768px; dialogWidth:1024px;");

    }
</script>
<style type="text/css">
    /*   .Fonts
    {
        color: Red;
    }*/
</style>
<script type="text/javascript">
    function FORM_Details(applyId, type, proId, code) {
        var arry = [
                { Code: "T1", Url: "/Module/ProjectDetails/IncomeBusiness.aspx", Title: "营业收入月计划统计表" },
                { Code: "T2", Url: "/Module/ProjectDetails/OutcomeGasMoney.aspx", Title: "预付气款情况明细表" },
                { Code: "T3", Url: "/Module/ProjectDetails/OutcomeThree.aspx", Title: "工程、大修项目支出月计划统计表" },
                { Code: "T4", Url: "/Module/ProjectDetails/OutcomeFour.aspx", Title: "其他大额支出月计划统计表" },
                { Code: "T5", Url: "/Module/ProjectDetails/OutcomeFive.aspx", Title: "其他产品及服务支出月计划统计表" },
                { Code: "T6", Url: "/Module/ProjectDetails/OutcomeInvestment1.aspx", Title: "投资项目支出月计划表"}];
        for (var i = 0; i < arry.length; i++) {
            if (arry[i].Code == code) {
                var url = arry[i].Url;
                url += "?ApplyId=" + applyId;
                url += "&ProId=" + proId;
                url += "&State=" + type;
                url += "&Select=sel";
                //直接调用主页面的Layer  https://www.layui.com/doc/modules/layer.html
                var option = {
                    title: arry[i].Title,
                    type: 2,
                    content: [url, 'no'],
                    area: ["850px", "530px"],
                    scrollbar: false,
                    success: function (laydom, index) {
                        //添加刷新事件
                        $(laydom)[0].ReLoad = function () {
                            $("#<%=Button1.ClientID %>").click();
                        };
                    }
                };
                top.layer.open(option);
                return;
            }
        }
        console.log("没有找到匹配的路由");
    }
</script>
<asp:HiddenField ID="HiddenField3" runat="server" />
<table width="100%" border="0" cellpadding="0" cellspacing="0">
    <tr>
        <td valign="top">
            <div id="div" style="width: 98%; border: 0;">
                <table width="100%" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td style="text-align: center; font-size: 16px; font-weight: bold; height: 30px;">
                            <asp:Label ID="lblyear" runat="server" />
                            月资金计划
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <div style="float: left; width: 100%;">
                                <table border="0" cellpadding="0" cellspacing="0" style="width: 100%;">
                                    <tr>
                                        <td style="width: 100px; padding-right: 3px; text-align: right;">填报单位：
                                        </td>
                                        <td style="text-align: left; padding-left: 3px;">
                                            <asp:Label ID="lbldw" runat="server" />
                                        </td>
                                        <td></td>
                                        <td style="width: 100px; color: red;">金额单位：万元
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <style type="text/css">
                                .cont_listZJ td.left {
                                    text-align: left;
                                    padding-left: 10px;
                                }

                                .cont_listZJ td.right {
                                    text-align: right;
                                    padding-right: 10px;
                                }
                            </style>
                            <asp:GridView ID="gvMonthFunds" runat="server" Width="100%" CssClass="cont_listZJ"
                                AutoGenerateColumns="False" OnRowDataBound="gvMonthFunds_RowDataBound">
                                <Columns>
                                    <asp:TemplateField HeaderText="编号" HeaderStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
                                        <ItemTemplate>
                                            <asp:HiddenField runat="server" ID="HiddenField1" Value='<%#Eval("IF_DETAILS") %>' />
                                            <asp:HiddenField runat="server" ID="HiddenField2" Value='<%#Eval("DETAILS_CODE") %>' />
                                            <asp:Label ID="lblProID" runat="server" Text='<%#Eval("n_proid") %>'></asp:Label>
                                            <asp:Label ID="lbltype" runat="server" Text='<%#Eval("n_type") %>' Visible="false"></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:BoundField DataField="c_proname" HeaderText="项目名称" ItemStyle-CssClass="left" />
                                    <asp:TemplateField HeaderText="上月止累计资金计划" HeaderStyle-HorizontalAlign="Center"
                                        ItemStyle-Width="80px" ItemStyle-CssClass="right">
                                        <ItemTemplate>
                                            <%#Utility.Helper.HtmlHelper.QyFormat(Convert.ToDecimal(Eval("N_SYAMOUNT")))%>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="上月止累计发生额" HeaderStyle-HorizontalAlign="Center"
                                        ItemStyle-Width="80px" ItemStyle-CssClass="right">
                                        <ItemTemplate>
                                            <%#Utility.Helper.HtmlHelper.QyFormat(Convert.ToDecimal(Eval("N_USEAMOUNT")))%>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="本月资金计划" HeaderStyle-HorizontalAlign="Center"
                                        ItemStyle-Width="80px" ItemStyle-CssClass="right">
                                        <ItemTemplate>
                                            <%#Utility.Helper.HtmlHelper.QyFormat(Convert.ToDecimal(Eval("N_AMOUNT")))%>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="本月资金计划审核资金额" HeaderStyle-HorizontalAlign="Center"
                                        ItemStyle-Width="80px" ItemStyle-CssClass="right">
                                        <ItemTemplate>
                                            <%#Utility.Helper.HtmlHelper.QyFormat(Convert.ToDecimal(Eval("N_AMOUNT_WEEK")))%>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="本月已支付资金" HeaderStyle-HorizontalAlign="Center"
                                        ItemStyle-Width="80px" ItemStyle-CssClass="right">
                                        <ItemTemplate>
                                            <%#Utility.Helper.HtmlHelper.QyFormat(Convert.ToDecimal(Eval("N_USEAMOUNT_WEEK")))%>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:BoundField DataField="n_amountProbability" HeaderText="流入/流出率"
                                        ItemStyle-Width="80px" ItemStyle-CssClass="right" />
                                    <asp:BoundField DataField="c_remark2" HeaderText="本月财务资产部审批意见" ItemStyle-CssClass="left" />
                                </Columns>
                                <EmptyDataTemplate>
                                    没有你所查询的数据
                                </EmptyDataTemplate>
                            </asp:GridView>
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: left; padding-left: 5px; height: 30px;">编制依据及事由：
                            <asp:Label ID="lblBzyj" runat="server" />
                            &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; 申请人：<asp:Label ID="lblUser" runat="server" />
                            &nbsp;&nbsp;&nbsp; &nbsp;申请时间：
                            <asp:Label ID="lblTime" runat="server" /><input type="hidden" runat="server" id="Hidden1" />
                            &nbsp;&nbsp;&nbsp; &nbsp;
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: center;">
                            <input type="hidden" runat="server" id="hidId" />
                            <asp:LinkButton ID="Button1" runat="server" OnClick="ReLoadClick"></asp:LinkButton>
                            <%-- <asp:Button ID="Button1" runat="server" Text="刷新数据" style="display:none;" OnClick="ReLoadClick" />--%>
                        </td>
                    </tr>
                </table>
            </div>
        </td>
    </tr>
</table>